<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sq="http://www.w3.org/1999/html">
<head>
  <th:block th:include="include :: header" />
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
  <div class="row">
    <div class="col-sm-12">
      <div class="ibox float-e-margins">
        <div class="ibox-title">
          <h5 th:text="${title}"></h5>
          <div class="ibox-tools">
            <a class="collapse-link">
              <i class="fa fa-chevron-up"></i>
            </a>
          </div>
        </div>
        <div class="ibox-content">
          <form class="form-horizontal m-t" id="editFrom" method="post">
            <div class="form-group">
              <label class="col-sm-3 control-label">分类编码：</label>
              <div class="col-sm-8">
                <input type="hidden" id="id" name="id" th:value="${dictionary.id}?:''">
                <input id="classCode" name="classCode" th:value="${dictionary.classCode}" type="text" minlength="4"
                       maxlength="20" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">分类名称：</label>
              <div class="col-sm-8">
                <input id="className" name="className" th:value="${dictionary.className}" type="text" minlength="1"
                       maxlength="50" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">字典编码：</label>
              <div class="col-sm-8">
                <input id="dataCode" name="dataCode" th:value="${dictionary.dataCode}" type="text" minlength="1"
                       maxlength="20" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">字典名称：</label>
              <div class="col-sm-8">
                <input id="dataName" name="dataName" th:value="${dictionary.dataName}" type="text" minlength="1"
                       maxlength="50" class="form-control" required="" aria-required="true">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">排序：</label>
              <div class="col-sm-8">
                <input id="dataOrder" name="dataOrder" th:value="${dictionary.dataOrder}" maxlength="2" type="num"
                       class="form-control">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">状态：</label>
              <div class="col-sm-8">
                <sq:select id="status" name="status" th:value="${dictionary.status}" dicCode="1001"
                           pleaseChooser="用户状态"></sq:select>
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-4 col-sm-offset-3">
                <button class="btn btn-primary" type="button" onclick="saveData()">
                  提交
                </button>
                <button class="btn btn-outline btn-default" type="button" onclick="back()">
                  返回
                </button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    const requestPath = parent.api.sys.dic
</script>
</html>